@import url('https://fonts.googleapis.com/css2?family=Reenie+Beanie&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@1,300&display=swap');
div {
    margin: 20px auto;
    width: 70%;
    font-family: 'Lato';
    padding: 5px;
    background: #666;
    color: #fff;
}

* {
    margin: 0;
    padding: 0;
}

#header {
    color: white;
    padding: 0 20px;
    min-height: 70px;
    text-shadow: 1px 1px black;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

h4 {
    font-weight: bold;
    font-size: 2rem;
}

p {
    font-family: 'Reenie Beanie';
    font-size: 2rem;
}

ul,
li {
    list-style: none;
}

ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

ul li a {
    text-decoration: none;
    color: #000;
    background: #ffc;
    display: block;
    height: 10em;
    width: 10em;
    padding: 1em;
    box-shadow: 5px 5px 7px rgba(33, 33, 33, .7);
    transition: transform .15s linear;
}

ul li {
    margin: 1em;
}

ul li:nth-child(odd) a {
    transform: rotate(-4deg);
    position: relative;
    top: 5px;
}

ul li:nth-child(even) a {
    transform: rotate(4deg);
    position: relative;
    top: 5px;
}

ul li:nth-child(3n) a {
    transform: rotate(-3deg);
    position: relative;
    top: -5px;
}

ul li:nth-child(5n) a {
    transform: rotate(5deg);
    position: relative;
    top: -10px;
}

ul li a:hover,
ul li a:focus {
    box-shadow: 10px 10px 7px rgba(0, 0, 0, .7);
    transform: scale(1.25);
    position: relative;
    z-index: 5;
}

ul li:nth-child(even) a {
    position: relative;
    top: 5px;
    background: #cfc;
}

ul li:nth-child(3n) a {
    position: relative;
    top: -5px;
    background: #ccf;
}